﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class Administrator_LoaiTin : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (this.GridView1.Rows.Count == 0)
        {
            this.FormView1.DefaultMode = FormViewMode.Insert;
        }
    }

    protected void FormView1_ItemInserted(object sender, FormViewInsertedEventArgs e)
    {
        Response.Redirect(Request.RawUrl);
    }
    protected void InsertCancelButton_Click(object sender, EventArgs e)
    {
        this.FormView1.DefaultMode = FormViewMode.ReadOnly;
    }
    protected void LinkButton1_Click(object sender, EventArgs e)
    {
        this.FormView1.DefaultMode = FormViewMode.Insert;
    }
}